import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.util.StringTokenizer;

public class PIE {
    private double binarySearch(double arr[],int vl){
        int n = arr.length;
        double s = 0.0 ; double e =  0.0;
        for(int i=0;i<n;++i) e = Math.max(e,arr[i]);
        s = e/vl;
        while(e-s>=1e-5){
            double m = (s+e)*0.5;
            int ct = 0;
            for(int i=0;i<n;++i)  ct += (int)(arr[i]/m);
            if(ct>=vl) s = m; else e = m;
        }
        return (s+e)*0.5;
    }
    private void run() throws Exception {
         BufferedReader bf = new BufferedReader(new InputStreamReader(System.in));
         StringTokenizer st = new StringTokenizer(bf.readLine());
         int tcase = Integer.parseInt(st.nextToken());
         while(tcase-->0){
             st = new StringTokenizer(bf.readLine());
             int n = Integer.parseInt(st.nextToken());
             int f = Integer.parseInt(st.nextToken())+1;
             double vol [] = new double [n];
             st = new StringTokenizer(bf.readLine());
             for(int i=0;i<n;++i){
                 double x = Double.parseDouble(st.nextToken());  vol[i] = 3.141592653589793*x*x;
             }
             System.out.printf("%.4f\n",binarySearch(vol,f));
         }
    }
    public static void main(String [] Args) throws Exception {
        new PIE().run();
    }
}